
public class Main {
    public static void main(String[] args) {
        Simulator simulator = new Simulator();

        Animal dog = new Dog();
        simulator.playSound(dog);

        Animal cat = new Cat();
        simulator.playSound(cat);
    }
}